
INCL_DIR = ../include
OBJ_LIB = ../obj
CC = gcc
CFLAGS = -g -I$(INCL_DIR)

INCLUDES = $(INCL_DIR)/machine.h $(INCL_DIR)/memory.h $(INCL_DIR)/inst.h

$(OBJ_LIB)/cream.o:	main.o inst.o
	ld -r -o $(OBJ_LIB)/cream.o main.o inst.o

main.o:		main.c $(INCLUDES)
inst.o:		inst.c $(INCLUDES)

.PHONY:	clean
clean:
	-echo "Removing all object files"
	-rm -f main.o inst.o $(OBJ_LIB)/cream.o
